package com.kc.road.camera.controller;

import com.kc.road.camera.common.Constants;
import com.kc.road.camera.service.RabbitMessageSenderService;
import com.kc.road.camera.vo.CameraVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by yzm on 2018/3/11.
 */
@RestController
public class TestController {

    @Autowired
    private RabbitMessageSenderService rabbitMessageSenderService;

    @RequestMapping(value = "aaa")
    public void aaa(){
        System.out.println("aaa发送消息");
        CameraVo vo = new CameraVo();
        rabbitMessageSenderService.sender(Constants.CAMERA_EXCHANGE,Constants.CAMERA_ROUTING_TOPIC_KEY+".1",vo);
    }

    @RequestMapping(value = "bbb")
    public void bbb(){
        System.out.println("bbb发送消息");
        CameraVo vo = new CameraVo();
        rabbitMessageSenderService.sender(Constants.WIFI_EXCHANGE,Constants.WIFI_ROUTING_TOPIC_KEY+".1",vo);
    }


}
